package com.ytzl.itrip.service;

import com.ytzl.itrip.pojo.ItripComment;
import com.ytzl.itrip.common.Page;
import com.ytzl.itrip.pojo.ItripImage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItripCommentService {

    public ItripComment getItripCommentById(@Param(value = "id") Long id) throws Exception;

    public List<ItripComment> getItripCommentListByMap(Map
                                                               <String, Object> param) throws Exception;

    public Integer getItripCommentCountByMap(Map
                                                     <String, Object> param) throws Exception;

    public Integer saveItripComment(ItripComment itripComment) throws Exception;

    public Integer modifyItripComment(ItripComment itripComment) throws Exception;

    public Integer removeItripCommentById(@Param(value = "id") Long id) throws Exception;

    public Page<ItripComment> queryItripCommentPageByMap(Map
                                                                 <String, Object> param, Integer pageNo, Integer pageSize) throws Exception;

    public Integer removeItripCommentByIds(@Param(value = "ids") Long[] ids) throws Exception;

    /**
     * 数据入库保存评论信息同时保存图片
     */
    void saveItripCommentAndItripImage(ItripComment itripComment, List<ItripImage> itripImages) throws Exception;
}
